
<?php /* @var $this Controller */ 

if(!Yii::app()->request->isAjaxRequest)
{
	$cs=Yii::app()->clientScript;
	$cs->registerCoreScript('jquery');
	$cs->registerCoreScript('yii');
	$cs->registerScriptFile(XHtml::jsUrl('common.js'), CClientScript::POS_HEAD);
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>
<div class="container" id="page">
					<!--mainmenu-->
		<?php $this->widget('bootstrap.widgets.TbNavbar', array(
			'type'=>'null', // null or 'inverse'
			'brand'=>CHtml::image(Yii::app()->getBaseUrl() . '/images/brand.png','logo', array('style'=>'width:152px;height:23px')),
			'brandUrl'=>'#',
			'collapse'=>true, // requires bootstrap-responsive.css
			'items'=>array(
						array(
							'class'=>'bootstrap.widgets.TbMenu',
							'htmlOptions'=>array('class'=>'pull-right'),
							'items'=>array(
									array('label'=>'Sign in', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest, 'icon'=>'user white'),
									array('label'=>'Hi! ('.Yii::app()->user->name.')','visible'=>!Yii::app()->user->isGuest,'icon'=>'user white',
							'items'=>array(
									array('label'=>'My Profile','url'=>array('/user/view','id'=>Yii::app()->session['UserId'])),
									array('label'=>'Change Password','url'=>array('/user/updatePassword','id'=>Yii::app()->session['UserId'])),
									array('label'=>'Donations','url'=>array('/donation/index')),

									'----------',
									array('label'=>'Sign out', 'url'=>array('/site/logout'),'icon'=>'lock', 'visible'=>!Yii::app()->user->isGuest)
								)),
							),
						),
						array(
							'class'=>'bootstrap.widgets.TbMenu',
							'htmlOptions'=>array('class'=>'pull-left'),
							'items'=>array(
									array('label'=>'Home', 'url'=>array('/site/index')),
									array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
							),
						),
						array(
							'class'=>'bootstrap.widgets.TbMenu',
							'htmlOptions'=>array('class'=>'pull-right'),
							'items'=>array(
									array('label'=>'Dashboard','icon'=>'globe white', 'url'=>array('/user/admin'),'visible'=>Yii::app()->user->checkAccess('admin')),
								),
						),
						/*array(
							'class'=>'bootstrap.widgets.TbMenu',
							'htmlOptions'=>array('class'=>'pull-right'),
							'items'=>array(
									array('label'=>'Missions', 'visible'=>Yii::app()->user->checkAccess('admin'),
							'items'=>array(
									array('label'=>'Missions','url'=>array('/mission')),
									array('label'=>'Mission Assignment','url'=>array('/missionAssignment')),
								)),
							),
						),*/
					
						/*array(
							'class'=>'bootstrap.widgets.TbMenu',
							'htmlOptions'=>array('class'=>'pull-right'),
							'items'=>array(
									array('label'=>'People', 'visible'=>Yii::app()->user->checkAccess('admin','encoder'),
							'items'=>array(
									array('label'=>'Alumni','url'=>array('/alumni')),
									array('label'=>'Volunteer','url'=>array('/volunteer')),
									array('label'=>'Profiles','url'=>array('/user')),	
								)),
							),
						),*/
),
						)); ?>

	<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
	<?php endif?>

	<?php echo $content; ?>

	<div class="clear"></div>

	<!--<div id="footer">
		Copyright &copy; <?php echo date('Y'); ?> by ama-asisi <?php echo Yii::powered(); ?>
	</div> footer -->

</div><!-- page -->

</body>
</html>
